<style type="text/css">
#apDiv1 {
	position: absolute;
	left: 575px;
	top: 557px;
	width: 96px;
	height: 25px;
	z-index: 1;
}
.pRIGHT {
	text-align: right;
}
#apDiv2 {
	position: absolute;
	left: 511px;
	top: 258px;
	width: 210px;
	height: 32px;
	z-index: 1;
}
#apDiv3 {
	position: relative;
	left: 620px;
	/*top: -100px;*/
}
</style>
<div id="contener" _height="auto">
	<div class="left_menu">
		<?php $this->beginWidget('application.widget.site.classWidget'); ?>
		<?php $this->endWidget(); ?>
		<?php $this->beginWidget('application.widget.site.productWidget'); ?>
		<?php $this->endWidget(); ?>
	</div>
	<div class="main">
		<?php $this->beginWidget('application.widget.site.newWidget'); ?>
		<?php $this->endWidget(); ?>
		<div class="right_mainBox">
			<div class="right_mainBox_top"></div>
			<div class="mainContentBox"> <img src="images/buySTEP3.png" width="724" height="75" class="buySTEP" />
				<div class="memberBOX123">
					<h4>親愛的&nbsp; <span class="name">
						<?=Yii::app()->user->name?>
						</span>&nbsp;會員您好:請確認下列的購物資訊是否正確。 </h4>
					<table border="0" width="720" cellspacing="3" cellpadding="0">
						<tbody>
							<tr>
								<th colspan="4"> 購物明細</th>
							</tr>
							<tr>
								<td width="400" scope="col">明細</td>
								<td width="200">數量</td>
								<td scope="col">優惠價</td>
							</tr>
							<?php
							$total_qty = 0;
							if($rowset){
								foreach($rowset as $row){
							?>
							<tr>
								<td><a href="<?=Yii::app()->createUrl('shop/detail',array('pid'=>$row->pid))?>" class="green">&#8226;&nbsp;
								<?=$row->pname?>
								</a></td>
								<td>
									<?php
										$total_qty += intval($row->getQuantity());
										echo $row->getQuantity();
									?>
								</td>
								<td>$<?=$row->getSumPrice()?></td>
							</tr>
							<?php
								}
							}
							?>							
						</tbody>
					</table>					
					<table border="0" width="720" cellspacing="3" cellpadding="0" class="table123">
						<tbody>
							<tr>
								<td align="right" width="650" colspan="2">購物金額總計:</td>
								<td width="70">$
									<?=Yii::app()->shoppingCart->getCost()?>
								</td>
							</tr>
							<?php
							if(Yii::app()->session->get('coin')){
							?>
							<tr>
								<td align="right" colspan="2">&ndash;可折抵購物金總額:</td>
								<td>$
									<?=Yii::app()->session->get('coin')?>
								</td>
							</tr>
							<?php
							}
							?>
							<tr>
								<td align="right" colspan="2" class="line">+運費(
									<select id="select" name="select">
										<option>宅配/貨運</option>
									</select>
									):</td>
								<td>$140</td>
							</tr>
						</tbody>
					</table>
					<p>購物車內合計有<?=$total_qty;?>項商品,應付金額:&nbsp;&nbsp;$
						<?=Yii::app()->shoppingCart->getCost()+Yii::app()->params['freight']-Yii::app()->session->get('coin')?>
					</p>
					<table width="720" border="0" cellspacing="3" cellpadding="0">
						<tr>
							<th colspan="4">付款方式與寄送資訊</th>
						</tr>
						<tr>
							<td width="73">付款方式:</td>
							<td colspan="3">
								<?=Yii::app()->params['paytype'][$payinfo->paytype]?>
							</td>
						</tr>
						<tr>
							<td>收件者:</td>
							<td colspan="3">
								<?=$payinfo->name?>
								<?=Yii::app()->params['pre'][$payinfo->pre]?>
							</td>
						</tr>
						<tr>
							<td>聯絡電話:</td>
							<td width="174">
								<?=$payinfo->phone?>
							</td>
							<td width="55">E-mail:</td>
							<td width="411">
								<?=$payinfo->email?>
							</td>
						</tr>
						<tr>
							<td>送貨地址:</td>
							<td colspan="3">
								<?=$payinfo->address?>
							</td>
						</tr>
						<tr>
							<td>取貨門市:</td>
							<td colspan="3">門市查詢<a href="#"><img src="images/search.png" width="19" height="19" border="0" align="absmiddle" /></a></td>
						</tr>
						<tr>
							<td>發票類型:</td>
							<td width="174">
								<?=Yii::app()->params['receipttype'][$payinfo->receipttype]?>
							</td>
							<td colspan="2">
								<?php
							if($payinfo->receipttype==1){
							?>
								買受人:
								<?=$payinfo->receiptfield1_1?>
								<?php
							}elseif($payinfo->receipttype==2){
							?>
								捐贈單位:
								<?=$payinfo->receiptfield1_2?>
								<?
							}elseif($payinfo->receipttype==3){
							?>
								買受人:
								<?=$payinfo->receiptfield1_3?>
								<?
							}elseif($payinfo->receipttype==4){
							?>
								統一編號:
								<?=$payinfo->receiptfield1_4?>
								發票抬頭:
								<?=$payinfo->receiptfield2?>
								<?
							}
							?>
							</td>
						</tr>
					</table>
					<div id="apDiv3">
						<input type="submit" name="button" id="button" value="確認無誤結帳" onclick="self.location.href='<?=Yii::app()->createUrl('shop/done')?>'"/ />
					</div>
				</div>
			</div>
			<div class="right_mainBox_bottom"></div>
		</div>
	</div>
</div>
